package com.lixl.collection;

import java.util.Iterator;

public class MyMapTest {

	public static void main(String[] args) {
		MyMap<String, String> m = new MyMap<String, String>();
		for (int i = 0; i < 108; i++) {
			m.put("key"+i, "value"+i);
		}
		System.out.println(m.size());
		
		System.out.println(m.get("key3"));

		Iterator<MyMap<String, String>.Entity> it = m.iterator();
		while(it.hasNext()){
			MyMap<String, String>.Entity e = it.next();
			System.out.println(e.getKey()+"="+e.getValue());
		}
		
		//arrayCopy();
	}
	
	public static void arrayCopy(){
		String[] array1 = new String[]{"1","3","6"};
		String[] array2 = new String[10];
		System.arraycopy(array1, 0, array2, 0, array1.length);
		System.out.println(array2);
		array1 = array2;
		array2 = null;
		System.out.println(array1);
	}

}
